<html xmlns:th="http://www.thymeleaf.org">
<html>
<head>
    <base href="<%=basePath%>">
    <meta charset="UTF-8">
    <title>查看发邮箱记录</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <link href="../../../../static/easyui/themes/insdep/easyui.css" rel="stylesheet" type="text/css">
    <link href="../../../../static/easyui/themes/insdep/easyui_animation.css" rel="stylesheet" type="text/css">
    <link href="../../../../static/easyui/themes/insdep/easyui_plus.css" rel="stylesheet" type="text/css">
    <link href="../../../../static/easyui/themes/insdep/insdep_theme_default.css" rel="stylesheet" type="text/css">
    <link href="../../../../static/easyui/themes/insdep/icon.css" rel="stylesheet" type="text/css">
    <link href="../../../../static/easyui/themes/color.css" rel="stylesheet" type="text/css">

    <link href="../../../../static/ztree/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css">
    <link href="../../../../static/css/common.css" rel="stylesheet" type="text/css">

    <script type="text/javascript" src="../../../../static/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../../../../static/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../../../static/easyui/themes/insdep/jquery.insdep-extend.min.js"></script>
    <script type="text/javascript" src="../../../../static/ztree/jquery.ztree.all.min.js"></script>
    <script type="text/javascript" src="../../../../static/easyui/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="../../../../static/kindeditor/kindeditor-all-min.js"></script>
</head>

<body>
<table id="messageList" class="easyui-datagrid" width="100%"></table>
<dir id="toolbar">
    <a href="javascript:void(0)" onclick="return writes('/system/message/MessageAction_write.action')"
       class="easyui-linkbutton" data-options="iconCls:'icon-add'">写邮件</a>
</dir>
</body>
<script type="text/javascript">
    function writes(url) {
        // window.location.href=url
        parent.parent.openTopWindow({
            width: 800,
            height: 500,
            "url": url,
            close: function () {
                $("#messageList").datagrid("reload")
            }
        })
    }

    $(function () {
        $("#messageList").datagrid({
            url: "/system/message/index_MessageAction_findByPage.action",
            pagination: true,
            toolbar: "#toolbar",
            fitColumns: true,
            idField: "messageid",
            rownumbers: true,
            columns: [
                [
                    {field: "id", title: "选择", checkbox: true},
                    {
                        field: "username", title: "发件人", width: 10,
                        formatter: function (value, rowData, index) {
                            return rowData.tbSystemUser.username;
                        }
                    },
                    {field: "toAddr", title: "收件人", width: 15},
                    {field: "content", title: "类容", width: 10},
                    {field: "sendtime", title: "发送时间", width: 15},
                    {field: "status", title: "状态", width: 10}
                ]
            ],
            loadFilter: function (data) {
                return {"total": data.totalRows, "rows": data.result}
            }
        })
    })
</script>
</html>
